﻿using MRSite.Common.Dependency;
using MRSite.Common.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MRSite.RedisCache
{
    public class RedisSerializer : IRedisSerializer, ITransient
    {
        public object Deserialize(string value)
        {
            return Json4NetHelper.Deserialize(value);
        }

        public string Serialize(object value, Type type)
        {
            return Json4NetHelper.Serialize2Format(value, type);
        }
    }
}
